package cn.nexd.map.location.collector.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by lawrence on 2015/11/24.
 */
public class BasebandDataResult implements Parcelable {

    private String id;  // 扫描ID
    private String basebandType; // 基带信号类型
    private String carrierType; // 运营商类型
    private Integer signalStrength;
    private String userId; // 用户id
    private long timestamp; // 扫描时间戳


    public BasebandDataResult() {

    }

    @Override
    public String toString() {
        return "BasebandDataResult{" +
                "id='" + id + '\'' +
                ", basebandType='" + basebandType + '\'' +
                ", carrierType='" + carrierType + '\'' +
                ", signalStrength=" + signalStrength +
                ", userId='" + userId + '\'' +
                ", timestamp=" + timestamp +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBasebandType() {
        return basebandType;
    }

    public void setBasebandType(String basebandType) {
        this.basebandType = basebandType;
    }

    public String getCarrierType() {
        return carrierType;
    }

    public void setCarrierType(String carrierType) {
        this.carrierType = carrierType;
    }

    public Integer getSignalStrength() {
        return signalStrength;
    }

    public void setSignalStrength(Integer signalStrength) {
        this.signalStrength = signalStrength;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }

    protected BasebandDataResult(Parcel in) {
        id = in.readString();
        basebandType = in.readString();
        carrierType = in.readString();
        userId = in.readString();
        timestamp = in.readLong();
    }

    public static final Creator<BasebandDataResult> CREATOR = new Creator<BasebandDataResult>() {
        @Override
        public BasebandDataResult createFromParcel(Parcel in) {
            return new BasebandDataResult(in);
        }

        @Override
        public BasebandDataResult[] newArray(int size) {
            return new BasebandDataResult[size];
        }
    };

    /**
     * Describe the kinds of special objects contained in this Parcelable's
     * marshalled representation.
     *
     * @return a bitmask indicating the set of special object types marshalled
     * by the Parcelable.
     */
    @Override
    public int describeContents() {
        return 0;
    }

    /**
     * Flatten this object in to a Parcel.
     *
     * @param dest  The Parcel in which the object should be written.
     * @param flags Additional flags about how the object should be written.
     *              May be 0 or {@link #PARCELABLE_WRITE_RETURN_VALUE}.
     */
    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(basebandType);
        dest.writeString(carrierType);
        dest.writeString(userId);
        dest.writeLong(timestamp);
    }
}
